/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package modelo.tableModels.renderers.tablecells;

import modelo.tableModels.Planes_TableModel;
import java.awt.Component;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumn;

/**
 *
 * @author Felipe
 */
public class String_TableCellRenderer extends JLabel implements TableCellRenderer{

    public String_TableCellRenderer(){
        setOpaque(true);
    }

    @Override
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
        String str = (String) value;
        setText(str);
        if (isSelected) {
            setBackground(table.getSelectionBackground());
            setForeground(table.getSelectionForeground());
        } else {
            setBackground(table.getBackground());
            setForeground(table.getForeground());
        }
        return this;
    }

}
